package javaweb.mapper;

import javaweb.pojo.Clazz;
import javaweb.pojo.Student;
import javaweb.pojo.StudentQueryParam;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface StudentMapper {

    /*
    *获取所有班级信息
    * */
    public List<Clazz> selectClazzList();

    /*
    * 学员信息分页查询
    * */
    public List<Student> selectAllStudent(StudentQueryParam studentQueryParam);

    /*
    * 新增学员操作
    * */
    public void insertStudent(Student student);

    /*
    * 根据id查询学员信息
    * */
    public Student selectStudentById(int id);

    /*
    * 修改学员的信息
    * */
    public void updateStudent(Student student);

    /*
    * 批量删除学员信息
    * */
    public void deleteStudentById(Integer[] ids);

    /*
    * 学员违纪处理
    * */
    public void updateStudentDisciplinary(Student student);

    /*
    * 获取班级学员人数报表
    * */
    @MapKey("name")
    public List<Map<String, Object>> countStudentByClazz();

    /*
    * 获取学员学历信息报表
    * */
    @MapKey("name")
    public List<Map<String, Object>> getStudentDegreeData();
}
